<?php class Xcrud_config
{
    // default connection
    public static $dbname = 'khodo'; // Your database name
    public static $dbuser = 'root'; // Your database username
    public static $dbpass = 'root'; // // Your database password
    public static $dbhost = 'localhost'; // Your database host, 'localhost' is default.
    
    
    // theme and language
    public static $theme = 'bootstrap'; // can be 'default', 'bootstrap', 'minimal' or your custom. Theme of xCRUD visual presentation. For using bootstrap you need to load it on your page.
    public static $language = 'en'; // sets default localization
    
    
    // database advanced
    public static $dbencoding = 'utf8'; // Your database encoding, default is 'utf8'. Do not change, if not sure.
    public static $db_time_zone = false; // database time zone, if you want use system default - leave empty
    public static $local_time_correction = 0;
    public static $mbencoding = 'utf-8'; // Your mb_string encoding, default is 'utf-8'. Do not change, if not sure.

    
    // session
    public static $sess_name = 'PHPSESSID'; // If your script is already using the session, specify the session name for it. By default, the name of the session in PHP equal 'PHPSESSID'.
    public static $sess_expire = 30; // Specifies the lifetime of the session, as well as the existence of a key safety (for example, the maximum edit-saving timeout).
    public static $dynamic_session = false; // this option is used for compatibility with with frameworks and cms that using dynamic session name.
    
    // session alternative
    public static $alt_session = false; // use this only if you have troubles with native php sessions
    public static $alt_encription_key = 'g7897***0986rg\\\9'; // needs tor protect alt. session data, required if alt. session is enabled
    public static $alt_lifetime = 60; // in minutes, maximum time between requests when instance's data will be valid valid 
    
    // scripts
    public static $load_bootstrap = false; // turn on, if you want to load bootstrap via xCRUD
    public static $load_googlemap = false;
    public static $disable_jquery =true; // Disables loading of jQuery, turn it on if you already have jQuery on your page  by version at least 1.7
    public static $disable_jquery_ui = false; // Disables loading of jQueryUI, turn it on if you already have jQueryUI on your page (datepicker and slider widgets are mandatory).
    public static $disable_jcrop = false;
    public static $jquery_no_conflict = true; // Includes jQuery.noConflict(). Use according to documentation jQuery.
    public static $manual_load = false; // Allows you to disable xcruds css and js output, but you can use Xcrud::load_css() & Xcrud::load_js() in your code manually.

    
    // editor
    public static $editor_url = 'http://bongdavl.vn/administrators/public/xcrud/xcrud2/editors/tinymce/tinymce.min.js';  // URL path to editor script, if you want to use the visual editor.
    public static $editor_init_url = ''; //  URL path to your custom initialization file for editor.
    public static $force_editor = false; // Forced initialization of editor, even if the path is not specified. Check this if you're already using editor on your page.

    
    // grid settings
    public static $show_primary_ai_field = true; // Show primary auto-increment field in create/edit view.
    public static $show_primary_ai_column = true; // Show primary auto-increment column in list view.
    public static $start_minimized = false; // Start all xCRUD instances minimized.
    public static $remove_confirm = true; // Show confirmation dialog on remove action.
    public static $column_cut = 50; // Sets the maximum number of characters in the column.
    public static $limit = 5; // default limit of rows per page
    public static $limit_list = array('20', '50', '100', 'all'); // default limits list
    public static $clickable_list_links = true; // make all links, emails clikable in list view
    public static $clickable_filenames = true; // makes filenames clikable in list view
    public static $fixed_action_buttons = true; // it allows to fix the action buttons on the right side of the table. Appears when you hover on row.
    public static $images_in_grid = true; // shows images in list view
    public static $images_in_grid_height = 55; // maximal height of thumbnails in list view
    public static $button_labels = false; // displays button labels in grid
    
    
    // print
    public static $print_all_fields = true; // print all fields and rows of table or only visible.
    
    
    // csv export
    public static $csv_delimiter = ';'; // default delimiter in CSV file.
    public static $csv_enclosure = '"'; // default enclosure in CSV file.
    public static $csv_all_fields = false; // export all fields and rows of table or only visible.

    
    // editing
    public static $make_checkbox = true; // display TINYINT(1),BIT(1),BOOL(1),BOOLEAN(1) fields like checkboxes
    public static $lists_null_opt = true; // display null(empty) option in all dropdowns and multiselects
    public static $enum_as_radio = false;
    public static $set_as_checkboxes = false;
    public static $upload_folder_def = '../uploads'; // Default uploads folder on your site, relative to xCRUD folder or absolute path required. Folder is must exist.
    
    
    // features
    public static $enable_printout = true; // show print button
    public static $enable_search = true; // show searck block
    public static $enable_pagination = true; // show pagination
    public static $enable_csv_export = true; // show csv export button
    public static $enable_table_title = true; // show table title and toggle button
    public static $enable_numbers = true; // show row numbers in grid
    public static $enable_limitlist = true; // show row numbers in grid
    public static $enable_sorting = true; // alows to sort by column
    public static $benchmark = false; // Displays information about the performance in the lower right corner.
    public static $nested_readonly_on_view = true;
    
       
    // alert settings
    public static $email_from = 'mailer@example.com'; // email from address
    public static $email_from_name = 'xCRUD Data Management System'; // email from name
    public static $email_enable_html = true; // enables html in email letters

    
    // remote request options (call_page() methods)
    public static $use_browser_info = false; // allow to use your browser cookie, referer, user agent for http request to some file or url. BE CAREFUL: DON'T USE IT FOR REQUESTS TO EXTERNAL SITES!!!

    
    // date
    public static $date_first_day = 1; // 0 - Sunday, 1 - Monday etc.
    public static $date_format = 'yy/mm/dd';
    public static $time_format = 'HH:mm:ss';
    public static $php_date_format = 'Y/m/d';
    public static $php_time_format = 'H:i:s';
    
    
    // search
    public static $search_all = true;
    public static $available_date_ranges = array(
        'next_year',
        'next_month',
        'today',
        'this_week_today',
        'this_week_full',
        'last_week',
        'last_2weeks',
        'this_month',
        'last_month',
        'last_3months',
        'last_6months',
        'this_year',
        'last_year');
    public static $search_pattern = array('%','%'); // uses for LIKE operator in SQL request
    public static $search_opened = false; // make search always opened
    
    
    // map
    public static $default_point = '35.6894875,139.69170639999993';
    public static $default_text = 'your_position';
    public static $default_zoom = 8;
    public static $default_width = 500;
    public static $default_height = 300;
    public static $default_coord = true;
    public static $default_search = true;
    public static $default_search_text = 'search_here';
    
    
    // xcrud folder url
    public static $scripts_url = ''; // URL to the xCRUD folder, not real path, without a trailing slash, can be relative, e.g. 'some_folder/xcrud' or absolute, e.g. 'http://www.your_site.com/some_folder/xcrud'. If empty - will be detected automatically
    public static $urls2abs = true; // makes relative urls to absolute. Turn off if you have some troubles with relative urls.
    
    
    // system integration options. NO ANY TRAILING SLASHES!
    // urls (relative to $scripts_url or xcrud's folder, if $scripts_url is not defined)
    public static $plugins_uri = 'plugins'; // scripts and libraries
    public static $themes_uri = 'themes'; // css, images
    public static $lang_uri = 'languages'; // js files
    public static $ajax_uri = 'xcrud_ajax.php'; // main ajax file or url
    // paths (relative to xcrud's folder)
    public static $themes_path = 'themes'; // php and ini files
    public static $lang_path = 'languages'; // ini files
    
    
    // system
    public static $demo_mode = false; // disables any changing data in database
    public static $performance_mode = false; // experimental, disables {field_tags} features
    
    

}
